package server.game.players;

import server.game.players.Client;

public class ActionAssistant2 {

	public Client client;
	
	public ActionAssistant2(Client client) {
		this.client = client;
	}
	
	public static void showInterface(Client client, int i) {
		client.getOutStream().createFrame(97);
		client.getOutStream().writeWord(i);
		client.flushOutStream();
	}
	
	public static void sendQuest(Client client, String s, int i) {
		client.getOutStream().createFrameVarSizeWord(126);
		client.getOutStream().writeString(s);
		client.getOutStream().writeWordA(i);
		client.getOutStream().endFrameVarSizeWord();
		client.flushOutStream();
	}


	

	public void sendQuestTab(){
		/*if(client.rfdRound == 0) {
			sendFrame126("Recipe for Disaster", 7332);
		} else if(client.rfdRound > 0 && client.rfdRound < 4) {
			sendFrame126("@yel@Recipe for Disaster", 7332);
		} else if(client.rfdRound == 4) {
			sendFrame126("@gre@Recipe for Disaster", 7332);
		}
		if(client.horrorFromDeep == 0) {
			sendFrame126("Horror from the Deep", 7333);
		} else if(client.horrorFromDeep == 1) {
			sendFrame126("@yel@Horror from the Deep", 7333);
		} else if(client.horrorFromDeep == 2) {
			sendFrame126("@gre@Horror from the Deep", 7333);
		}
		if(client.desertT == 0) {
			sendFrame126("Desert Treasure", 7334);
		} else if(client.desertT == 1) {
			sendFrame126("@yel@Desert Treasure", 7334);
		} else if(client.desertT == 2) {
			sendFrame126("@gre@Desert Treasure", 7334);
		}
		if(client.cooksA == 0) {
			sendFrame126("Cook's Assistant", 7336);
		} else if(client.cooksA == 1) {
			sendFrame126("@yel@Cook's Assistant", 7336);
		} else if(client.cooksA == 3) {
			sendFrame126("@gre@Cook's Assistant", 7336);
		}
		if(client.doricQuest == 0) {
			sendFrame126("Doric's Quest", 7339);
		} else if(client.doricQuest < 100 && client.doricQuest > 0) {
			sendFrame126("@yel@Doric's Quest", 7339);
		} else if(client.doricQuest == 100) {
			sendFrame126("@gre@Doric's Quest", 7339);
		}*/
		sendFrame126("@or1@Quest Points: "+client.questPoints, 640);
	}
	
	public void sendFrame126(String s, int id) {
		//synchronized(c) {
			if(client.getOutStream() != null && client != null ) {
				client.getOutStream().createFrameVarSizeWord(126);
				client.getOutStream().writeString(s);
				client.getOutStream().writeWordA(id);
				client.getOutStream().endFrameVarSizeWord();
				client.flushOutStream();
			}
		//}
	}
}